package catherineliu.main.singleton.builder.food;

/**
 * 项目：DesignPatternsDemo
 * 文件描述：使用 MealBuilder 来演示建造者模式
 * 作者：ljj
 * 创建时间：2020/11/26
 */
public class MealBuilderPatternsDemo {

    public static void main(String[] args) {
        MealBuilder mealBuilder = new MealBuilder();

        Meal vegMeal = mealBuilder.prepareVegMeal();
        System.out.println("Veg Meal");
        vegMeal.showItems();
        System.out.println("Total Cost: " + vegMeal.getCost());

        Meal nonVegMeal = mealBuilder.prepareNonVegMeal();
        System.out.println("Non Veg Meal");
        nonVegMeal.showItems();
        System.out.println("Total Cost: " + nonVegMeal.getCost());

    }

}
